home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gwu / adaed / math / math.ads < prev    next >
Encoding:
Text File  |  1996-01-30  |  3.8 KB  |  81 lines

  1. --  -----------------------------------------------------------------------
  2. --  Title:       Float_elementary_functions
  3. --  Last Mod:    Thu Apr 19 12:40:15 1990
  4. --  Author:      Vincent Broman <broman@nosc.mil>
  5. --   Copyright 1990 Vincent Broman
  6. --     Permission granted to copy, modify, or compile this software for
  7. --   one's own use, provided that this copyright notice is preserved intact.
  8. --     Permission granted to distribute compiled binary copies of this
  9. --   software which are linked in with some other application.
  10. --     Permission granted to distribute other copies of this software,
  11. --   provided that (1) any copy which is not source code, i.e. not in the
  12. --   form in which the software is usually maintained, must be accompanied
  13. --   by a copy of the source code from which it was compiled, and (2) the
  14. --   one distributing it must refrain from imposing on the recipient
  15. --   further restrictions on the distribution of this software.
  16. --   
  17. --  Visibility:  withed by generic_elementary_functions body
  18. --  Description:
  19. --
  20. --      a Float-precision implementation of 
  21. --      the proposed standard generic package of elementary functions, 
  22. --      from the ISO-IEC/JTC1/SC22/WG9 (Ada)
  23. --      Numerics Rapporteur Group proposal, Draft 1.1.
  24. --      
  25. --      mantissa size of 21 to 24 bits assumed.
  26. -- 
  27. --      This will evolve to conform to later drafts.
  28. -- 
  29. --  Exceptions:  argument_error, numeric_error are raised.
  30. --  -----------------------------------------------------------------------
  31. with elementary_functions_exceptions;
  32. package Math is
  33.  
  34.     function sqrt    ( x         : Float )        return Float;
  35.     function log     ( x         : Float )        return Float;
  36.     function log     ( x , base  : Float )        return Float;
  37.     function exp     ( x         : Float )        return Float;
  38.     function "**"    ( x , y     : Float )        return Float;
  39.  
  40.     function sin     ( x         : Float )        return Float;
  41.     function sin     ( x , cycle : Float )        return Float;
  42.     function cos     ( x         : Float )        return Float;
  43.     function cos     ( x , cycle : Float )        return Float;
  44.     function tan     ( x         : Float )        return Float;
  45.     function tan     ( x , cycle : Float )        return Float;
  46.     function cot     ( x         : Float )        return Float;
  47.     function cot     ( x , cycle : Float )        return Float;
  48.  
  49.     function arcsin  ( x         : Float )        return Float;
  50.     function arcsin  ( x , cycle : Float )        return Float;
  51.     function arccos  ( x         : Float )        return Float;
  52.     function arccos  ( x , cycle : Float )        return Float;
  53.     function arctan  ( y         : Float;
  54.                x         : Float := 1.0 ) return Float;
  55.     function arctan  ( y         : Float;
  56.                x         : Float := 1.0;
  57.                cycle     : Float )        return Float;
  58.     function arccot  ( x         : Float;
  59.                y         : Float := 1.0 ) return Float;
  60.     function arccot  ( x         : Float;
  61.                y         : Float := 1.0;
  62.                cycle     : Float )        return Float;
  63.  
  64.     function sinh    ( x         : Float )        return Float;
  65.     function cosh    ( x         : Float )        return Float;
  66.     function tanh    ( x         : Float )        return Float;
  67.     function coth    ( x         : Float )        return Float;
  68.  
  69.     function arcsinh ( x         : Float )        return Float;
  70.     function arccosh ( x         : Float )        return Float;
  71.     function arctanh ( x         : Float )        return Float;
  72.     function arccoth ( x         : Float )        return Float;
  73.  
  74.  
  75.     argument_error: exception
  76.     renames elementary_functions_exceptions.argument_error;
  77.  
  78. end Math;
  79.  
  80. -- $Header: s_elementary_functions_s.ada,v 3.13 90/04/19 12:40:59 broman Rel $
  81.